package com.baor.controller;

import com.baor.domain.AddressVo;
import com.baor.service.AddressService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/address")
public class AdressController {
    @Autowired
    private AddressService addressService;
    @RequestMapping("/list")
   public AjaxResult<?> list(@RequestBody Map<String,Object> params){
        return this.addressService.list(params);
    }
    @RequestMapping("/add")
    public AjaxResult<?> add(@RequestBody Map<String, Object> params){
        return this.addressService.add(params);
    }
    @RequestMapping("/update")
    public AjaxResult<?> update(@RequestBody Map<String, Object> params){
        return this.addressService.update(params);
    }
    @RequestMapping("/delete")
    public AjaxResult<?> delete(@RequestBody Map<String,Object> params) {
        return this.addressService.delete(params);
    }
    @RequestMapping("/selectById")
    public AjaxResult<?> selectById(@RequestBody Map<String,Object> params) {
        return this.addressService.selectById(params);
    }
}
